package com.jason.kotlin.gank.api

import com.jason.kotlin.gank.model.CaiYunApiResponse
import com.jason.kotlin.gank.model.CaiYunResultBean
import retrofit2.http.GET
import retrofit2.http.Headers
import retrofit2.http.Path

/**
 * @description: CaiYunService
 *
 * @author ChenBaoyang
 * @date 4/26/21 17:43
 */
interface CaiYunService {

    @Headers("Cache-Control: public, max-age=120")
    @GET("/v2.5/pyKtcjONpEwWt6MP/{location}/realtime.json")
    suspend fun getWeatherFromCaiyun(
        @Path("location") location: String?
    ): CaiYunApiResponse<CaiYunResultBean>
}